<?php


namespace app\common\model;

use think\Model;
use traits\model\SoftDelete;

class GiftLog extends Model
{
    use SoftDelete;
    // 表名
    protected $name = 'gift_log';
    // 开启自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    protected $deleteTime = 'deletetime';
    
    public function gift()
    {
        return $this->belongsTo("Gift", 'gift_id', 'id')->setEagerlyType(0);
    }
}